var teamId;
var teamName;
var tmGameId;
var backURL;
var gameTechList={};
$(document).ready(function(){ 
	$('#header').animate({'top':'0px'},400);
	teamId = args.teamId; //取得id的值
	teamName = args.teamName;
	tmGameId = args.tmGameId;
	backURL = args.backURL;
	
	var paraData = {teamId:teamId,tmGameId:tmGameId};
	$.getJSON(path+"/soccer/teamGameAction!viewGameSignupList.action",paraData, function(data){
		signupList = data.signupList;
	  	  var gameSignupHtml=[];
	  	  $.each(signupList,function(index,obj){
	  		gameSignupHtml.push("<tr>");
	  		gameSignupHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.playerNo+"</td>");
	  		gameSignupHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.signupUserName+"</td>");
	  		gameSignupHtml.push("<td nowrap='nowrap' style='color:yellow'>"+SIGNUP_FLAG_ARRAY[obj.signupFlag]+"</td>");
	  		if(obj.playFlag=="1"){
	  			gameSignupHtml.push("<td nowrap='nowrap' style='color:yellow'>"+PLAY_FLAG_ARRAY[obj.playFlag]+"</td>");
	  		}else{
	  			gameSignupHtml.push("<td nowrap='nowrap' style='color:red'>"+PLAY_FLAG_ARRAY[obj.playFlag]+"</td>");
	  		}
	  		gameSignupHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.friendQuantity+"</td>");
	  		gameSignupHtml.push("<td nowrap='nowrap' style='color:yellow'>"+obj.remark+"</td>");
	  		gameSignupHtml.push("</tr>");
	  	  });
	  	  $("#gameSignupBody").html(gameSignupHtml.join(""));  
	});
	
//	$("#submitBtn").click(function(){
////		var techForm = $("#techForm");
////		techForm.submit();
//		
//		var jsonStr = JSON.stringify(gameTechList);
//		$.post(path+"/soccer/teamGameAction!gameTechSubmit.action",{teamId:teamId,tmGameId:tmGameId,jsonStr:jsonStr}, function(data){
//			strMessage = data.strMessage;
//			$('#strMessage').text(strMessage);
//		},'json');
//	});
});
function goBack(){
	window.location.href=path+backURL+"?teamId="+teamId+"&teamName="+teamName;
}
